# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=perl-class-factory-util
pkgver=1.7
pkgrel=10
pkgdesc="Provide utility methods for factory classes"
arch=(any)
license=('GPL' 'PerlArtistic')
url="https://search.cpan.org/dist/Class-Factory-Util/"
options=(!emptydirs)
depends=('perl')
makedepends=('perl-module-build')
source=(https://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Class-Factory-Util-1.7.tar.gz)
md5sums=('aebd79da361b676a7ecd3245fc3d1b3f')

build() {
  cd "$srcdir"/Class-Factory-Util-${pkgver}
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd "$srcdir"/Class-Factory-Util-${pkgver}
  make install DESTDIR="$pkgdir"

  # remove perllocal.pod and .packlist
  find "$pkgdir" -name perllocal.pod -delete
  find "$pkgdir" -name .packlist -delete
}
